<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

<link rel="stylesheet" href="/static/css/form.css">
<link rel="stylesheet" href="sweetalert2.css" >
  <div class="container">
        <h2>添加学生信息</h2>
    <form method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="lLEB4alupRXpFdkEiU8TwKJJjtWH5QUVfEYI804zwZuI6sDi8k7IIaiOGVYr5Jf9">
        
        <div class="form-group">
            <label for="id_student_name">姓名:</label>
            <input type="text" name="student_name" maxlength="50" required id="id_student_name">
            
        </div>
        
        <div class="form-group">
            <label for="id_student_number">学籍号:</label>
            <input type="text" name="student_number" maxlength="20" required id="id_student_number">
            
        </div>
        
        <div class="handleButton">
            <button type="submit" id="saveButton">保存</button>
            <button type="button" id="cancelButton" onclick="window.parent.Swal.close();">取消</button>
        </div>
    </form>
</div>

<script>
  document.getElementById('cancelButton').addEventListener('click',function(){
      window.parent.closeIframePopup(); //调用父页面的函数
  })
  //提交表单
</script>

</body>
</html>